import App from './App'
import { createSSRApp } from 'vue'
import * as Pinia from 'pinia'
import setupI18n from './locale/index'
// 引入全局uview-plus
import uviewPlus from '@/uni_modules/uview-plus'
export function createApp() {
  const app = createSSRApp(App)
  app.use(uviewPlus, () => {
    return {
      options: {
        // 修改$u.config对象的属性
        config: {
          // 修改默认单位为rpx，相当于执行 uni.$u.config.unit = 'rpx'
          unit: 'rpx'
        }
      }
    }
  })
  app.use(Pinia.createPinia())
  setupI18n(app)
  return {
    app,
    Pinia
  }
}

